﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using SmartWMS.Common.ResponseOutput;
using SmartWMS.Server.BusinessServer.AccountingServer;
using SmartWMS.Server.BusinessServer.AccountingServer.Dto;

namespace SmartWMS.API.Controllers.BusinessMange
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    [ApiExplorerSettings(GroupName = "Business")]
    public class AccountingsController : ControllerBase
    {
        private readonly IAccountingServers _accountingServers;

        public AccountingsController(IAccountingServers accountingServers)
        {
            _accountingServers = accountingServers;
        }

        /// <summary>
        /// 财务记账列表
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<Response<List<AccountingDtoPas>>> GetAccountingDtoPas(AccountingDtoPage dto) { 
            var list=await _accountingServers.GetAccountingDtoPas(dto);
            return list;
        }
    }
}
